function isEmpty(obj){
  flag = true;

  for(key in obj){
   flag = false;
  }

  return flag;
}

let schedule = {};

console.log( isEmpty(schedule) );

schedule["8:30"] = "get up";

console.log( isEmpty(schedule) );
